<template>
  <div id="app">
    <component :is="isLoggedIn ? 'HomePage' : 'Login'" @login="handleLogin" />
  </div>
</template>

<script>
import Login from './components/Login.vue';
import HomePage from './components/HomePage.vue';

export default {
  name: 'App',
  components: {
    Login,
    HomePage,
  },
  data() {
    return {
      isLoggedIn: false,
    };
  },
  methods: {
    handleLogin() {
      this.isLoggedIn = true;
    },
    handleLogout() {
      this.isLoggedIn = false;
    },
  },
};
</script>


<style>
body, html, #app {
  margin: 0;
  padding: 0;
  height: 100%;
}
</style>
